package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ScriptPersonageInfoMapper;
import com.ruoyi.system.domain.ScriptPersonageInfo;
import com.ruoyi.system.service.IScriptPersonageInfoService;

/**
 * 剧本信息Service业务层处理
 *
 * @author ruoyi
 * @date 2021-08-19
 */
@Service
public class ScriptPersonageInfoServiceImpl implements IScriptPersonageInfoService
{
    @Autowired
    private ScriptPersonageInfoMapper scriptPersonageInfoMapper;

    /**
     * 查询剧本信息
     *
     * @param id 剧本信息主键
     * @return 剧本信息
     */
    @Override
    public ScriptPersonageInfo selectScriptPersonageInfoById(Long id)
    {
        return scriptPersonageInfoMapper.selectScriptPersonageInfoById(id);
    }

    /**
     * 查询剧本信息列表
     *
     * @param scriptPersonageInfo 剧本信息
     * @return 剧本信息
     */
    @Override
    public List<ScriptPersonageInfo> selectScriptPersonageInfoList(ScriptPersonageInfo scriptPersonageInfo)
    {
        return scriptPersonageInfoMapper.selectScriptPersonageInfoList(scriptPersonageInfo);
    }

    /**
     * 新增剧本信息
     *
     * @param scriptPersonageInfo 剧本信息
     * @return 结果
     */
    @Override
    public int insertScriptPersonageInfo(ScriptPersonageInfo scriptPersonageInfo)
    {
        return scriptPersonageInfoMapper.insertScriptPersonageInfo(scriptPersonageInfo);
    }

    /**
     * 修改剧本信息
     *
     * @param scriptPersonageInfo 剧本信息
     * @return 结果
     */
    @Override
    public int updateScriptPersonageInfo(ScriptPersonageInfo scriptPersonageInfo)
    {
        return scriptPersonageInfoMapper.updateScriptPersonageInfo(scriptPersonageInfo);
    }

    /**
     * 批量删除剧本信息
     *
     * @param ids 需要删除的剧本信息主键
     * @return 结果
     */
    @Override
    public int deleteScriptPersonageInfoByIds(Long[] ids)
    {
        return scriptPersonageInfoMapper.deleteScriptPersonageInfoByIds(ids);
    }

    /**
     * 删除剧本信息信息
     *
     * @param id 剧本信息主键
     * @return 结果
     */
    @Override
    public int deleteScriptPersonageInfoById(Long id)
    {
        return scriptPersonageInfoMapper.deleteScriptPersonageInfoById(id);
    }
}